<?php

/**
 * Laravel-admin - admin builder based on Laravel.
 * @author z-song <https://github.com/z-song>
 *
 * Bootstraper for Admin.
 *
 * Here you can remove builtin form field:
 * Encore\Admin\Form::forget(['map', 'editor']);
 *
 * Or extend custom form field:
 * Encore\Admin\Form::extend('php', PHPEditor::class);
 *
 * Or require js and css assets:
 * Admin::css('/packages/prettydocs/css/styles.css');
 * Admin::js('/packages/prettydocs/js/main.js');
 *
 */

use Encore\Admin\Form;
use Encore\Admin\Grid\Column;
use App\Admin\Extensions\Column\ExpandRow;
// app('view')->prependNamespace('admin', resource_path('views/admin'));
Column::extend('expand', ExpandRow::class);

Admin::js('/vendor/laravel-admin/layer/layer.js');
Admin::js('/js/common.js?v=9.3');
Admin::css('/css/common.css?v=2.6');

//设置顶部左侧右侧
Admin::navbar(function (\Encore\Admin\Widgets\Navbar $navbar) {
    $navbar->left('<button class="btn btn-info btn-sm build-index" onclick="build_index()">生成首页</button>');
	$navbar->right(view('admin.tools.select_skin'));
});

Form::forget(['map']);
//app('translator')->addNamespace('admin', resource_path('lang/admin'));
Form::extend('editor', App\Admin\Extensions\Form\WangEditor::class);
Form::extend('eidtcode', App\Admin\Extensions\Form\EidtCode::class);
Form::extend('atla', App\Admin\Extensions\Form\Atla::class);